﻿@page
@{
    ViewData["Title"] = "Convert VB.NET to/from C# online";
    ViewData["Keywords"] = "convert, c#, csharp, cs, VB, VB.NET, Visual Basic,code converter, csharp to vb, vb to csharp, c#, vb.net, vb, convert,free, Roslyn, code, converter, tool, conversion, file, class, module, refactoring, open source, oss";
    ViewData["Description"] = "Completely free and open source code converter. Convert snippets online, or download the Visual Studio Extension to convert whole projects/solutions and increase conversion accuracy.";
}

<br />

<div class="row">
    <div class="col-md-8">
        <div id="app">
            <div class="form-group">
                <label>Input code ({{inputCodeLanguage}})</label>
                <textarea id="inputTextArea" v-model="inputCode" class="form-control" rows="10" style="min-width: 100%"></textarea>
            </div>
            <div class="form-group">
                <button id="convert-button" class="btn btn-default" v-on:click="convert()">Convert Code</button>
                &nbsp;
                <label class="horizontal-spaced">
                    <input type="radio" v-model="requestedConversion" value="vbnet2cs">
                    VB.NET to C#
                </label>
                &nbsp;
                <label class="horizontal-spaced">
                    <input type="radio" v-model="requestedConversion" value="cs2vbnet">
                    C# to VB.NET
                </label>
                &nbsp;
                <div class="spinner horizontal-spaced" v-if="converterCallInflight"></div>
            </div>
            <div class="form-group">
                <label>Converted code ({{outputCodeLanguage}})</label>
                <textarea id="outputTextArea" v-model="convertedCode" class="form-control" rows="10" style="min-width: 100%"></textarea>
            </div>

            <p v-if="showErrors" style="white-space: pre-wrap">Error message:<br />{{errorMessageOnResponse}}</p>

            <p>Get a more accurate conversion by using our free <a href="https://marketplace.visualstudio.com/items?itemName=SharpDevelopTeam.CodeConverter">Code Converter extension for Visual Studio</a>.</p>
        </div>
    </div>
</div>

<script src="~/js/axios.min.js"></script>
<script src="~/js/vue-2.6.10.min.js"></script>
<script src="~/js/index.js"></script>
